<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href='<spring:url value="/resources/css/jquery-ui-1.10.4.custom.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/validationEngine.jquery.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/template.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/middle.css"></spring:url>'>
    <script src='<spring:url value="/resources/js/jquery-1.11.0.js"></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery-ui-1.10.4.custom.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery.validationEngine-zh_CN.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery.validationEngine.js" ></spring:url>'></script>
    <script type="text/javascript">
        $(function () {
            var height = $(window).height() - 240 - 41;
            $("#divQuery").css("height", height + "px");

            $("#frmUser").validationEngine();
            $("#btnSubmit").click(function () {
                $("#frmUser").submit();
            });
        });
    </script>
</head>
<body>
<div id="divQuery" style="overflow-y:auto;">
    <form id="frmUser" action="/cms/user/maintenance/save" method="post">
        <table id="maintenanceTable" align="center" class="service_maintenance">
            <tr>
                <td align="right">*&nbsp;用户:</td>
                <td align="left"><input type="text" id="useruserName" name="user.userName"
                                        value="${staffer.user.userName}"
                                        class="validate[required,custom[onlyLetterNumber],maxSize[15]] text-input"
                                        readonly style="background-color:#ededed;"/></td>
            </tr>
            <tr>
                <td align="right">*&nbsp;登录密码:</td>
                <td align="left"><input type="password" id="userpassword" name="user.password"
                                        value="${staffer.user.password}"
                                        class="validate[required,custom[onlyLetterNumber],maxSize[15]] text-input"/>
                </td>
            </tr>
            <tr>
                <td align="right">*&nbsp;确认密码:</td>
                <td align="left"><input type="password" id="userpassword2" value=""
                                        class="validate[required,equals[userpassword]]"/></td>
            </tr>
            <tr>
                <td align="right" width="25%">*&nbsp;工号:</td>
                <td align="left"><input type="text" id="stafferId" name="stafferId" value="${staffer.stafferId}"
                                        class="validate[required,maxSize[15]] text-input" readonly
                                        style="background-color:#ededed;"/></td>
            </tr>
            <tr>
                <td align="right">*&nbsp;姓名:</td>
                <td align="left"><input type="text" id="stafferName" name="stafferName" value="${staffer.stafferName}"
                                        class="validate[required,maxSize[15]] text-input"/></td>
            </tr>
            <tr>
                <td align="right">电话:</td>
                <td align="left"><input type="text" id="telephone" name="telephone" value="${staffer.telephone}"
                                        class="validate[optional,custom[phone]] text-input"/></td>
            </tr>
            <tr>
                <td align="right">邮箱:</td>
                <td align="left"><input type="text" id="mail" name="mail" value="${staffer.mail}"
                                        class="validate[custom[email]] text-input"/></td>
            </tr>
            <tr>
                <td align="right">职位:</td>
                <td align="left"><input type="text" id="position" name="position.position"
                                        value="${staffer.position.position}" readonly
                                        style="background-color:#ededed;"/></td>
            </tr>
            <tr>
                <td align="right">所属部门:</td>
                <td align="left"><input type="text" id="department" name="department.department"
                                        value="${staffer.department.department}" readonly
                                        style="background-color:#ededed;"/></td>
            </tr>
            <tr>
                <td align="right">角色:</td>
                <td align="left"><input type="text" id="user" name="user.userRole.roleName"
                                        value="${staffer.user.userRole.roleName}" readonly
                                        style="background-color:#ededed;"/></td>
                <td>
                    <input type="hidden" name="id" value="${staffer.id}"/>
                    <input type="hidden" name="user.id" value="${staffer.user.id}"/>
                    <input type="hidden" name="user.userRole.id" value="${staffer.user.userRole.id}"/>
                    <input type="hidden" name="position.id" value="${staffer.position.id}"/>
                    <input type="hidden" name="department.id" value="${staffer.department.id}"/></td>
            </tr>

        </table>
        <hr/>
        <div align="center" style="margin-top:10px; margin-bottom: 10px">
            <a id="btnSubmit" href="#"><img
                    src='<spring:url value="/resources/images/service/queding.png" ></spring:url>' border="0"/></a>
        </div>
    </form>
</div>
</body>
</html>